﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace MxWeiXinPF.BLL
{
    public partial class indexcatepic
    {
        private readonly MxWeiXinPF.DAL.indexcatepic dal;
        private readonly MxWeiXinPF.Model.siteconfig siteConfig = new MxWeiXinPF.BLL.siteconfig().loadConfig();

        public indexcatepic()
        {
            this.dal = new MxWeiXinPF.DAL.indexcatepic(this.siteConfig.sysdatabaseprefix);
        }

        public int Add(MxWeiXinPF.Model.indexcatepic model)
        {
            return this.dal.Add(model);
        }

        public bool Delete(int id)
        {
            return this.dal.Delete(id);
        }

        public bool Exists(int id)
        {
            return this.dal.Exists(id);
        }

        public int GetCount(string strWhere)
        {
            return this.dal.GetCount(strWhere);
        }

        public DataSet GetList(int Top, string strWhere, string filedOrder)
        {
            return this.dal.GetList(Top, strWhere, filedOrder);
        }

        public DataSet GetList(int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            recordCount = 0;
            return this.dal.GetList(pageSize, pageIndex, strWhere, filedOrder, out recordCount);
        }

        public MxWeiXinPF.Model.indexcatepic GetModel(int id)
        {
            return this.dal.GetModel(id);
        }

        public string GetTitle(int id)
        {
            return this.dal.GetTitle(id);
        }

        public DataSet GetWCodeList(int wid, int pageSize, int pageIndex, string strWhere, string filedOrder, out int recordCount)
        {
            recordCount = 0;
            return this.dal.GetWCodeList(wid, pageSize, pageIndex, strWhere, filedOrder, out recordCount);
        }

        public bool Update(MxWeiXinPF.Model.indexcatepic model)
        {
            return this.dal.Update(model);
        }

        public void UpdateField(int id, string strValue)
        {
            this.dal.UpdateField(id, strValue);
        }
    }
}
